<!DOCTYPE html>
<html>
<head>
    <title>优惠券表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sys:coupon:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:coupon:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:coupon:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">优惠券名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.name" placeholder="优惠券名"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">使用条件的值</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.useAmount" placeholder="使用条件的值"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">优惠券金额</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.amount" placeholder="优惠券金额"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">发放总数</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.total" placeholder="发放总数"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">已领取数量</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.issusedNum" placeholder="已领取数量"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态 1:有效 2:无效 3，删除；</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.curState" placeholder="状态 1:有效 2:无效 3，删除；"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">一段时间内有效的天数</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.number" placeholder="一段时间内有效的天数"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">生效类型  1：有效期内生效，2：领取一段时间内有效</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.type" placeholder="生效类型  1：有效期内生效，2：领取一段时间内有效"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">开始时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.beginTime" placeholder="开始时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">结束时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.endTime" placeholder="结束时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">简介描述</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.summary" placeholder="简介描述"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建人id</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.createBy" placeholder="创建人id"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.createTime" placeholder="创建时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">更新人id</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.updateBy" placeholder="更新人id"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">更新时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="coupon.updateTime" placeholder="更新时间"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/coupon.js?_${.now?long}"></script>
</body>
</html>